home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.xml;
-
- import java.util.Enumeration;
-
- public class DCDWriter extends SchemaWriter implements ExportInterface {
- ElemProxy elemProxy;
- AttrProxy attrProxy;
- EntityProxy entityProxy;
- PEntityProxy pEntityProxy;
- static final int DATATYPES = 1;
-
- public DCDWriter(SchemaIntf var1) {
- super(var1, var1.getURI());
- }
-
- public DCDWriter(SchemaIntf var1, URI var2) {
- super(var1, var2);
- }
-
- private String qualifiedAttrName(String var1) {
- AttributeDeclaration var2 = (AttributeDeclaration)super.schema.getNamedDeclaration(var1, Class.forName("com.extensibility.xml.AttributeDeclaration"));
- return var2 != null && var2.isGlobal() ? ((SchemaWriter)this).getQName(var1, Class.forName("com.extensibility.xml.AttributeDeclaration")) : var1;
- }
-
- String getPrefix(int var1) {
- switch (var1) {
- case 1:
- return "dt:";
- default:
- return "";
- }
- }
-
- protected SchemaWriter.DeclWriterProxyIntf createProxy(ElementDeclaration var1) {
- if (this.elemProxy == null) {
- this.elemProxy = new ElemProxy(this);
- }
-
- this.elemProxy.setDecl(var1);
- return this.elemProxy;
- }
-
- protected SchemaWriter.DeclWriterProxyIntf createProxy(AttributeDeclaration var1) {
- if (this.attrProxy == null) {
- this.attrProxy = new AttrProxy(this);
- }
-
- this.attrProxy.setDecl(var1);
- return this.attrProxy;
- }
-
- protected SchemaWriter.DeclWriterProxyIntf createProxy(GeneralEntityDeclaration var1) {
- if (this.entityProxy == null) {
- this.entityProxy = new EntityProxy(this);
- }
-
- this.entityProxy.setDecl(var1);
- return this.entityProxy;
- }
-
- protected SchemaWriter.DeclWriterProxyIntf createProxy(ParameterEntityDeclaration var1) {
- if (!(var1 instanceof InternalPEDeclaration)) {
- return super.createProxy(var1);
- } else {
- if (this.pEntityProxy == null) {
- this.pEntityProxy = new PEntityProxy(this);
- }
-
- this.pEntityProxy.setDecl(var1);
- return this.pEntityProxy;
- }
- }
-
- protected void writeHeader(SXE var1) {
- var1.writeComment("Generated by XML Authority. Conforms to DCD 1.0");
- var1.writeElem("DCD");
- var1.writeAttr("xmlns:RDF", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
- }
-
- protected void writeIncludes(SXE var1, Enumeration var2) {
- while(var2.hasMoreElements()) {
- ExternalSubset var3 = (ExternalSubset)var2.nextElement();
- URI var4 = var3.getSystemURI();
- var1.writeLineBreak();
- var1.writeAttr(String.valueOf("xmlns:").concat(String.valueOf(((SchemaWriter)this).getPrefix(var4))), var4.toSource());
- }
-
- }
-
- protected void writeNamespaces(SXE var1, Enumeration var2) {
- while(var2.hasMoreElements()) {
- NamespaceDeclaration var3 = (NamespaceDeclaration)var2.nextElement();
- var1.writeLineBreak();
- var1.writeAttr(String.valueOf("xmlns:").concat(String.valueOf(((BaseDeclaration)var3).getName())), var3.getNamespace());
- }
-
- }
-
- // $FF: synthetic method
- static String access$2000071(DCDWriter var0, String var1) {
- return var0.qualifiedAttrName(var1);
- }
- }
-